package com.mk.admin.controller;

import com.mk.admin.model.ResultDto;
import com.mk.admin.model.query.MedicalTechnologyProjectQuery;
import com.mk.admin.model.vo.MedicalTechnologyProjectRemoteVo;
import com.mk.admin.model.vo.MedicalTechnologyProjectVo;
import com.mk.admin.service.MedicalTechnologyProjectService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a/adm/medicalTechnologyProject")
@Api(tags = "医技预约套餐")
public class MedicalTechnologyProjectController {
    @Autowired
    private MedicalTechnologyProjectService medicalTechnologyProjectService;

    @PostMapping("/select")
    public ResultDto select(@RequestBody MedicalTechnologyProjectQuery query) {
        return medicalTechnologyProjectService.select(query);
    }

    @PostMapping("/add")
    public ResultDto add(@RequestBody MedicalTechnologyProjectVo vo) {
        return medicalTechnologyProjectService.add(vo);
    }

    @PostMapping("/update")
    public ResultDto update(@RequestBody MedicalTechnologyProjectVo vo) {
        return medicalTechnologyProjectService.update(vo);
    }

    @PostMapping("/delete")
    public ResultDto delete(@RequestBody MedicalTechnologyProjectVo vo) {
        return medicalTechnologyProjectService.delete(vo.getId());
    }

    @PostMapping("/status")
    public ResultDto status(@RequestBody MedicalTechnologyProjectVo vo) {
        return medicalTechnologyProjectService.status(vo.getId());
    }
}
